package com.example.wechat.model;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.example.project.annotation.Excel;
import com.example.project.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 微信群成员对象 t_wechat_group_member
 * 
 * @author ruoyi
 * @date 2025-11-12
 */
public class WechatGroupMember extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/** 成员ID */
	private Long id;

	/** 群聊ID */
	@Excel(name = "群聊ID")
	private Long groupId;

	/** 用户ID */
	@Excel(name = "用户ID")
	private String userId;

	/** 用户姓名 */
	@Excel(name = "用户姓名")
	private String userName;

	/** 用户头像 */
	@Excel(name = "用户头像")
	private String userAvatar;

	/** 成员角色（1：群主，2：管理员，3：普通成员） */
	@Excel(name = "成员角色", readConverterExp = "1=：群主，2：管理员，3：普通成员")
	private Long memberRole;

	/** 加入时间 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@Excel(name = "加入时间", width = 30, dateFormat = "yyyy-MM-dd")
	private Date joinTime;

	/** 群内昵称 */
	@Excel(name = "群内昵称")
	private String nicknameInGroup;

	/** 最后阅读的消息ID */
	@Excel(name = "最后阅读的消息ID")
	private Long lastReadMessageId;

	/** 状态（0：已退出，1：正常） */
	@Excel(name = "状态", readConverterExp = "0=：已退出，1：正常")
	private Long status;

	/** 删除标志（0：正常，1：删除） */
	private Long delFlag;

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	public Long getGroupId() {
		return groupId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserAvatar(String userAvatar) {
		this.userAvatar = userAvatar;
	}

	public String getUserAvatar() {
		return userAvatar;
	}

	public void setMemberRole(Long memberRole) {
		this.memberRole = memberRole;
	}

	public Long getMemberRole() {
		return memberRole;
	}

	public void setJoinTime(Date joinTime) {
		this.joinTime = joinTime;
	}

	public Date getJoinTime() {
		return joinTime;
	}

	public void setNicknameInGroup(String nicknameInGroup) {
		this.nicknameInGroup = nicknameInGroup;
	}

	public String getNicknameInGroup() {
		return nicknameInGroup;
	}

	public void setLastReadMessageId(Long lastReadMessageId) {
		this.lastReadMessageId = lastReadMessageId;
	}

	public Long getLastReadMessageId() {
		return lastReadMessageId;
	}

	public void setStatus(Long status) {
		this.status = status;
	}

	public Long getStatus() {
		return status;
	}

	public void setDelFlag(Long delFlag) {
		this.delFlag = delFlag;
	}

	public Long getDelFlag() {
		return delFlag;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("groupId", getGroupId()).append("userId", getUserId()).append("userName", getUserName())
				.append("userAvatar", getUserAvatar()).append("memberRole", getMemberRole())
				.append("joinTime", getJoinTime()).append("nicknameInGroup", getNicknameInGroup())
				.append("lastReadMessageId", getLastReadMessageId()).append("status", getStatus())
				.append("createTime", getCreateTime()).append("updateTime", getUpdateTime())
				.append("delFlag", getDelFlag()).toString();
	}
}
